package test.bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * 业务相关的entity基类，项目中entity共有的代码可以放在这里
 * @author wangjg
 *
 */
@MappedSuperclass
public abstract class BasicBizEntity {
	private static final long serialVersionUID = 1L;
	
	public static final String TRUE = "Y";
	public static final String FALSE = "N";
	
	// 企业ID
	@Column(nullable=false)
	protected Long companyId;
	protected Date addTime;
	protected Date updateTime;
	
	public abstract Long getId();

	public abstract void setId(Long id);
	
	public Serializable realId() {
		return this.getId();
	}

	public Long getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Long companyId) {
		this.companyId = companyId;
	}

	public Date getAddTime() {
		return addTime;
	}

	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}
